var update = {
	data: {
		wgtVer: "获取中...",
		latestWgtVer: "获取中...",
		innerVersion: "获取中..."
	},
	mounted: function() {
		var T = this;
		plus.runtime.getProperty(plus.runtime.appid, function(inf) {
			T.wgtVer = inf.version;
			T.innerVersion = plus.runtime.innerVersion;
		});
		T.getLastestVer();
	},
	methods: {
		getLastestVer: function() {
			var T = this;
			mui.ajax({
				url: "http://digimonx-test.nos-eastchina1.126.net/gw2appinfo.json?t=" + new Date().getTime(),
				type: "GET",
				dataType: "json",
				success: function(result) {
					T.latestWgtVer = result.latestWgtVer;
				}
			});
		},
		doUpgrade: function() {
			if(this.wgtVer == this.latestWgtVer) {
				mui.alert("无需更新");
			} else if(this.latestWgtVer == '获取中...') {
				mui.alert("获取更新信息出错");
			} else {
				upgrade("http://digimonx-test.nos-eastchina1.126.net/gw2info.latest.wgt");
			}
		}
	}
};